﻿using System.Configuration;

namespace Web7.Core.Configuration
{
    public class Web7SettingConfigurationElementCollection : ConfigurationElementCollection
    {
        public override ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return ConfigurationElementCollectionType.AddRemoveClearMap;
            }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new Web7SettingConfigurationElement();
        }

        protected new Web7SettingConfigurationElement BaseGet(int index)
        {
            return (Web7SettingConfigurationElement)base.BaseGet(index);
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((Web7SettingConfigurationElement)element).Name;
        }
    }
}
